#include <iostream>
#include <vector>
#include <set>
#include <algorithm>

using std::vector;
using std::cin;
using std::cout;
using std::set;
using std::pair;
using std::make_pair;
using std::min;

class Graph {
    struct Vertex {
        double x, y;
        int number;
        vector <Vertex*> edges;
        Vertex(): x(0), y(0), number(0) {}
        Vertex(double new_x, double new_y, Graph *graph) : x(new_x), y(new_y) {
            edges.reserve(graph->count);
            number = graph->vertices.size();
        }

        void add_edge(Vertex &a) {
            edges.push_back(&a);
        }
    };

    int count;
    vector <Vertex> vertices;

    double distance(Vertex &a, Vertex &b) const {
        return (a.x - b.x) * (a.x - b.x)
                + (a.y - b.y) * (a.y - b.y);
    }
    void add_vertex(double x, double y) {
        vertices.push_back(Vertex(x, y, this));
    }
    void dfs(int current_number, vector <bool> &used) {
        used[current_number] = 1;
        for (auto it = vertices[current_number].edges.begin();
             it != vertices[current_number].edges.end(); ++it) {
            if (used[(*it)->number] == 0) {
                dfs((*it)->number, used);
            }
        }
    }

public:
    Graph(): count(0) {}
    template <typename iter>
    Graph(iter input_begin, iter input_end): count((input_end - input_begin) / 2) {
        vertices.reserve((input_end - input_begin) / 2);
        for (iter i = input_begin; i != input_end; i += 2) {
            add_vertex(*i, *(i + 1));
        }
    }
    void reserve(int n) {
        vertices.reserve(n);
    }
    void make_edges(double k) {
        for (int i = 0; i < count; ++i) {
            for (int j = 0; j < count; ++j) {
                if (i != j && distance(vertices[i], vertices[j]) <= k * k) {
                    vertices[i].add_edge(vertices[j]);
                    vertices[j].add_edge(vertices[i]);
                }
            }
        }
    }
    bool is_connected() {
        vector <bool> used(count, 0);
        dfs(0, used);
        for (int i = 0; i < count; ++i) {
            if (used[i] == 0) {
                return 0;
            }
        }
        return 1;
    }
};

int main () {
    int n;
    double k;
    vector <double> in;
    cin >> n >> k;
    in.reserve(2 * n);
    for (int i = 0; i < n; ++i) {
        double x, y;
        cin >> x >> y;
        in.push_back(x);
        in.push_back(y);
    }
    Graph graph(in.begin(), in.end());
    graph.make_edges(k);
    if (graph.is_connected()) {
        cout << "YES";
    } else {
        cout << "NO";
    }
}
